<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sites</title>
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.5.1.min.js" type="text/javascript"></script>
<style type="text/css">
	#tip{color:#3366CC;}
</style>
<script type="text/javascript">
	
	$(function () {
			
    });

	function choosecol(){
		var sid = $("#sid").val();
		window.open('/cms/choosecol/' + sid,'请选择栏目','width=350,height=300,left=' + (screen.availWidth - 350) / 2 + ',top=' + (screen.availHeight - 300) / 2);
	}
	
	function setcol(parm){		
		var ary = parm.split('|');
		if(ary.length == 2){
			var cid = ary[0];
			var cname = ary[1];
			$("#cname").val(cname);
			$("#cid").val(cid);
		}
	}
	function mygen(){
		$("#btnGen").attr('disabled','true');
		$("#tip").html('正在生成，请稍候......');
		$.post("/cms/dogenhtml", { 			
			sid: $("#sid").val(), 
			cid: $("#cid").val()
			},function (data) {
				$("#tip").html(data);
				$("#btnGen").attr('disabled','');
		});
	}	
</script>
</head>
<body>
	<div class="listTitle">生成静态页面</div>
	
	<table cellpadding="5" >
			<tr><td>网站</td><td><select id="sid" name="sid" ><?php foreach($sites as $key=>$value){?><option value="<?=$key?>"><?=$value?></option><?php }?></select></tr>
			<tr><td>栏目</td><td><input type="text" id="cname" name="cname" value="" /><input type="hidden" id="cid" name="cid" value="" /><input type="button" value="..." onclick="choosecol()"></td></tr>
			<tr><td></td><td><input type="button" id="btnGen" value="开始生成"  onclick="mygen()"/></td></tr>
			<tr><td></td><td><div id="tip"></div></td></tr>
	</table>
	
</body>
</html>